package com.joysuch.wwyt.patrol.mapper;

import com.joysuch.wwyt.patrol.entity.PatrolOption;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.joysuch.wwyt.patrol.entity.bean.ExcelItemBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lrf
 * @since 2022-03-01
 */
@Repository
public interface PatrolOptionMapper extends BaseMapper<PatrolOption> {

    int deleteByIds(@Param("ids") List<Long> ids);

    List<String> findOptionByTypeId(Long dataTypeId);

    /**
     * 根据状态数据id,以及选项名称查看选项是否存在
     * @param optionName
     * @param tenentId
     * @param orgCode
     * @return
     */
    PatrolOption findByTypeIdAndName(Long dataTypeId, String optionName, Long tenentId, String orgCode);

    List<ExcelItemBean> getExcelItemList(Long tenentId, String orgCode);
}
